package com.songcha.sakura.ui.adapter

import android.content.Context
import android.widget.FrameLayout
import android.widget.TextView


import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.songcha.library_common.util.dp2px
import com.songcha.sakura.R


/***
 * 测试
 */
class TestListAdapter2(val mContext: Context, list:MutableList<Int>) : BaseQuickAdapter<Int,BaseViewHolder>(R.layout.item_test_list2,list) {



    override fun convert(holder: BaseViewHolder, item:Int) {

       val tv=holder.getView<TextView>(R.id.tv)

         tv.apply {
             text=item.toString()
             val titleLp = layoutParams as FrameLayout.LayoutParams
             titleLp.height=if (item%2==0) 150.dp2px() else 100.dp2px()
             layoutParams = titleLp
         }



    }

}